package com.qding.park.manager.pojo;

import java.util.Date;
import java.util.List;

public class TbCar {
	
	
	public static class ParkInfo{
		
		private int parkID;
		
		private String parkName;
		
		private Date cardExpiration;

		
		public int getParkID() {
			return parkID;
		}

		public void setParkID(int parkID) {
			this.parkID = parkID;
		}

		public String getParkName() {
			return parkName;
		}

		public void setParkName(String parkName) {
			this.parkName = parkName;
		}

		public Date getCardExpiration() {
			return cardExpiration;
		}

		public void setCardExpiration(Date cardExpiration) {
			this.cardExpiration = cardExpiration;
		}
		
		
	}
	
	private int id;
	/**
	 * @Field @userID : TODO(用户id)
	 */
	private int userID;
	
	/**
	 * @Field @bjUserCode : TODO(北京用户id)
	 */
	private String bjUserCode;
	
	/**
	 * @Field @parkID : TODO(车场id)
	 */
	private int parkID;
	
	/**
	 * @Field @parkName : TODO(车场名称)
	 */
	private String parkName;
	
	/**
	 * @Field @carNum : TODO(车场牌)
	 */
	private String carNum;
	
	private int cardType;
	
	/**
	 * @Field @remainingNum : TODO(剩余临停车位)
	 */
	private int remainingNum;
	
	
	/**
	 * @Field @reserveTime : TODO(可以提前多久预定)
	 */
	private int reserveTime;
	
	/**
	 * @Field @cardExpiration : TODO(卡到期时间)
	 */
	private Date cardExpiration;
	
	
	private String tel;
	
	private int supplierId;
	
	private int status;
	
	
	private int carType;
	
	private Date checkOutTime;
	
	/**
	 * 卡片名称
	 */
	private String cardName;
	
	private  List<ParkInfo> parkList;
	
	
	/**
	 * 车主名称
	 */
	private String  memberName;
	
	/**
	 * 住址
	 */
	private String  homeAddr;
	
	/**
	 * 月租金
	 */
	private int monthFee;
	
	/**
	 * 车位
	 */
	private String carSpace;
	
	/**
	 * 操作员
	 */
	private String operator;
	
	/**
	 * 发行时间
	 */
	private Date  issueTime;
	
	public int getUserID() {
		return userID;
	}

	public void setUserID(int userID) {
		this.userID = userID;
	}

	public int getParkID() {
		return parkID;
	}

	public void setParkID(int parkID) {
		this.parkID = parkID;
	}

	public String getParkName() {
		return parkName;
	}

	public void setParkName(String parkName) {
		this.parkName = parkName;
	}

	public String getCarNum() {
		return carNum;
	}

	public void setCarNum(String carNum) {
		this.carNum = carNum;
	}

	public int getRemainingNum() {
		return remainingNum;
	}

	public void setRemainingNum(int remainingNum) {
		this.remainingNum = remainingNum;
	}

	public int getReserveTime() {
		return reserveTime;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public void setReserveTime(int reserveTime) {
		this.reserveTime = reserveTime;
	}

	public Date getCardExpiration() {
		return cardExpiration;
	}

	public void setCardExpiration(Date cardExpiration) {
		this.cardExpiration = cardExpiration;
	}

	public String getBjUserCode() {
		return bjUserCode;
	}

	public void setBjUserCode(String bjUserCode) {
		this.bjUserCode = bjUserCode;
	}

	public int getCardType() {
		return cardType;
	}

	public void setCardType(int cardType) {
		this.cardType = cardType;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(int supplierId) {
		this.supplierId = supplierId;
	}

	public int getCarType() {
		return carType;
	}

	public void setCarType(int carType) {
		this.carType = carType;
	}

	public Date getCheckOutTime() {
		return checkOutTime;
	}

	public void setCheckOutTime(Date checkOutTime) {
		this.checkOutTime = checkOutTime;
	}

	public List<ParkInfo> getParkList() {
		return parkList;
	}

	public void setParkList(List<ParkInfo> parkList) {
		this.parkList = parkList;
	}

	public String getMemberName() {
		return memberName;
	}

	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}

	public String getHomeAddr() {
		return homeAddr;
	}

	public void setHomeAddr(String homeAddr) {
		this.homeAddr = homeAddr;
	}

	public int getMonthFee() {
		return monthFee;
	}

	public void setMonthFee(int monthFee) {
		this.monthFee = monthFee;
	}

	public String getCarSpace() {
		return carSpace;
	}

	public void setCarSpace(String carSpace) {
		this.carSpace = carSpace;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public Date getIssueTime() {
		return issueTime;
	}

	public void setIssueTime(Date issueTime) {
		this.issueTime = issueTime;
	}
	
	public String getCardName() {
		return cardName;
	}

	public void setCardName(String cardName) {
		this.cardName = cardName;
	}

	public int getExpiryStatus(){
		
		if(this.cardExpiration==null){
			return 1;//未过期　
		}
		if(this.cardExpiration.getTime()>new Date().getTime()){
			return 0;//未过期　
		}else{
			return 1;//已过期　
		}
	}
	
}
